package Routers

import (
	"gorm-gin-master/Controllers"
	"github.com/gin-gonic/gin"
)

// Book 模块
func BookRouter(Router *gin.RouterGroup) {
	v1 := Router.Group("/")
	{
		v1.GET("book", Controllers.ListBook)
		v1.POST("book", Controllers.AddNewBook)
		v1.GET("book/:id", Controllers.GetOneBook)
		v1.PUT("book/:id", Controllers.PutOneBook)
		v1.DELETE("book/:id", Controllers.DeleteBook)
	}
}

// User 模块
// func UserRouter(Router *gin.RouterGroup) {
// 	...
// }